The present invention relates to improving the quality of an image being displayed by, for example, a printer or a monitor and, more particularly, to automatically improving the image quality without introducing undesirable hue shifts.
When reproducing a computer monitor""s displayed image on a printer, the user typically wants the printed image to match the image on the monitor as closely as possible. A close match, however, is desirable only when the input image is ideal. With greater access to mediums such as digital cameras, desktop scanners, and the internet, users are gaining greater access to digital images that have varying degrees of quality. The disadvantage of having the printed image closely match the input image is that if the image is of poor quality, the printed image will retain the input image""s negative characteristics, such as poor contrast and improper lighting. Consequently, the image may be printed with the true colors of the image compressed and/or details washed out.
After-market products exist for the user to manually adjust the contrast, brightness or color levels of the input image. In some cases, adjustments are made automatically to the contrast and tone levels of an image. While these after-market applications may improve poor images, they also introduce unwanted hue shifts.
Current printer drive technology requires that in order for a user to obtain feedback on the actual image print quality, the user must actually print out and look at the image. At present, automatic enhancements are limited to halftoning methods that distribute dots more evenly, filters to increase sharpness or to reduce graininess in the printed image, and color maps to reproduce hues more accurately. However, these methods of enhancement have negligible impact on images of poor quality.
A common method of improving the quality of an image is to use histogram contrast equalization. A histogram provides a global description of the appearance of an image by charting the number of pixels at each tone level. Contrast equalization involves increasing the dynamic range of an image by maximizing the spread between adjacent tone levels. While equalization extracts information in regions where tone levels are tightly compressed, equalization can also cause hue shifts and over saturation.
Consequently, there is a need for a method to automatically improve the quality of digital images without causing undesired hue shifts or degrading the characteristics of high quality images.
An automatic contrast enhancement method and apparatus improves the quality of an image by increasing the dynamic range of the tone levels in an image without causing an undesirable hue shift. An overall stretch factor that is used to stretch the dynamic range of all the colors and is generated based on the standard deviation of the tone levels for the overall luminance of the image. A color weighting factor is used to individually control the amount that the tone levels in each color are altered. The color weighting factor is based on the difference between the standard deviation of the tone levels for the overall luminance of the image and the standard deviation of the tone levels for each color. An anchor factor is used to preserve the mean tone level for each color while the tone levels far from the mean tone level are changed more dramatically than the tone levels close to the mean tone level, which minimizes hue shifts while maximizing contrast enhancement.
The contrast enhancement method analyzes image characteristics, such as the mean tone level and standard deviation of the tone levels for the overall luminance of the image and the standard deviations of the tone levels for the different colors to determine the level of improvement that can be applied to the image. A minimal dynamic range stretch may be performed if the image is saturated at one of the extreme tone levels for a color or if there is a large variation in the standard deviations for the colors and the mean tone level for the luminance is near a mid tone level. Performing a full dynamic range stretch on an image with these characteristics may result in a noisy image or an even more saturated image, and only a minimal dynamic range stretch is performed. Further, if the standard deviation of the overall luminance is greater than a contrast threshold the image is considered to have an adequate contrast and, thus, no changes are made to the image.